<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.DriverManager"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<%
String userid = request.getParameter("userid"); 
String pw1 = request.getParameter("pw1");
String pw2 = request.getParameter("pw2");
String email = request.getParameter("email");

DriverManager.registerDriver(new com.mysql.jdbc.Driver());
Connection conn = DriverManager.getConnection("jdbc:mysql://j.snpy.org/j102","jstu","abc123");
Statement stmt = conn.createStatement();
String sq1 = "Insert into users(id,password,email) values ('"+userid+"','"+pw1+"','"+email+"')";
System.out.println(sq1);

%>


<body>
<font>
帳號 : <input name="userid" type="text" value="" /><br>
密碼 : <input name="pw1" type="text" value=""/><br>
密碼 : <input name="pw2" type="text" value=""/><br>
email : <input name="email" type="text" value=""/><br>
<input type="submit" value="註冊">
</font>
</body>
</html>